package com.hdu.asyncInitBean.bean;

import com.hdu.async_initialize_bean.annotation.AsyncInit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@Slf4j
public class Bean {

    @PostConstruct
    public void init() {
        try {
            Thread.sleep(10000);
            log.info("Bean init");
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
